import { createSlice } from '@reduxjs/toolkit'

export const departmentSlice = createSlice({
  name: 'department',
  initialState: {
    departmentList:[],
  },
  reducers: {
    Init: (state, action) => {
      state.departmentList = action.payload.departmentList;
    },
    
  }
})

export const { Init } = departmentSlice.actions
export const selectDepartmentList = state => state.department.departmentList;
export default departmentSlice.reducer